import request from '@/utils/request'
// import qs from 'qs'

export function LoginByAccount (params) {
  return request({
    url: '/ygbx/user/login',
    method: 'post',
    data: params
  })
}

export function getImage () {
  return request({
    url: '/ygbx/user/getImageCode',
    method: 'get'
  })
}

export function changePwd (params) {
  return request({
    url: '/ygbx/user/updateUser',
    method: 'post',
    data: params
  })
}

export function getYzm (params) {
  return request({
    url: '/ygbx/user/sendPhoneCode',
    method: 'post',
    data: params
  })
}

export function logout () {
  return request({
    url: '/login/logout',
    method: 'post'
  })
}

export function getUserInfo (token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function registerInfo (params) {
  return request({
    url: '/ygbx/user/addUser',
    method: 'post',
    data: params
  })
}
